<!DOCTYPE html>
<html lang="en" xmlns:v-if="http://www.w3.org/1999/xhtml" xmlns:v-elseif="http://www.w3.org/1999/xhtml"
      xmlns:v-else="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/vue/html.js"></script>
    <script src="../../js/vue/jquery/jquery.js"></script>
</head>
<body>
<a href="vur-add.html">添加</a>
<div id="nb">
    <ul>
        <!--employee 需要进行遍历的数组-->
        <li v-for = "content in employee">
            {{content.id}}-->{{content.name}}-->{{content.age}}-->{{content.sex==1?"男":"女"}}
            <!--content是一个变量所有不能直接拼接 vur-edit.html?id=这用''修饰成字符串进行拼接-->
            <a :href="'vur-edit.html?id='+content.id">编辑</a>
        </li>
    </ul>
</div>
<script>
    var vue = new Vue({
        el: "#nb",
        data:{
            employee:{
            }
        },
        mounted:function(){
            var _this = this;
            $.get("http://localhost:8888/employee/list",function (data) {
                _this.employee = data;
            })
        }
    })
</script>
</body>
</html>